home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / User Interface / StandardAlertModule / StandardAlertModule ReadMe! < prev    next >
Encoding:
Text File  |  1999-08-05  |  3.3 KB  |  65 lines

  1. StandardAlertModule
  2. Version 0.1 - August 5, 1999 - Jakob Bock
  3. -----------------------------------------
  4. Description:
  5. This module helps you display standard alert box's using the toolbox function "StandardAlert".
  6.  
  7. Benefits of this module
  8. - Easy to use.
  9. - Autoscaling of dialog, textfields and buttons.
  10. - Your alerts look like they should.
  11.  
  12. Limitations
  13. - No support movable alerts.
  14. - No support help icons.
  15. - The label and narrative strings can hold max. 255 characters.
  16.  
  17. Requirements
  18. - MacOS 8.+
  19. - REALbasic 2.1+
  20.  
  21. Methods
  22.  
  23. NoteAlert( label as string , narrative as string ) as integer
  24.                 Displays an alert with a talking face icon and an OK button.
  25.  
  26.                 label - short, simple summary of the error or condition which summoned the alert.
  27.                 narrative - more detailed description of the situation and its consequences.
  28.                 return value - Possible value are: -1 = error ; 1 = everything is ok.
  29.  
  30. CautionAlert( label as string , narrative as string , defaultCaption, cancelCaption, otherCaption) as integer
  31.                 Displays an alert with a triangle an OK and a Cancel button ( + an optional third button )
  32.  
  33.                 label- short, simple summary of the error or condition which summoned the alert.
  34.                 narrative - more detailed description of the situation and its consequences.
  35.                 defaultCaption - the caption of the default button (1). If left blank the current systems default default string is used.
  36.                 cancelCaption - the caption of the cancel button (3). If left blank the current systems default cancel string is used.
  37.                 otherCaption - the caption of the cancel button. If left blank this button will not appear.
  38.                 return value    -    Returns the id of the pressed button. Possible value are: 0 = error ; 1 = button one ( the default button ) ; 2 = button two ( the cancel button ) ; 3 = button three
  39.  
  40. StopAlert( label as string , narrative as string ) as integer
  41.                 Displays an alert with a stop icon and an OK button
  42.  
  43.                 label - short, simple summary of the error or condition which summoned the alert.
  44.                 narrative - more detailed description of the situation and its consequences.
  45.                 return value - Possible value are: -1 = error ; 1 = everything is ok.
  46.  
  47. CustomAlert(alertType as integer, label as string, narrative as string, defaultCaption as string, cancelCaption as string, otherCaption as string, defaultButton as integer, cancelButton as integer) as integer
  48.         
  49.                 label - short, simple summary of the error or condition which summoned the alert.
  50.                 narrative - more detailed description of the situation and its consequences.
  51.                 defaultCaption - the caption of the default button 1. If left blank the current systems default default string is used.
  52.                 cancelCaption - the caption of the cancel button 2. If left blank the current systems default cancel string is used.
  53.                 otherCaption - the caption of the cancel button. If left blank this button will not appear.
  54.                 defaultButton - Specifies which button acts as the default button*
  55.                 cancelButton - Specifies which button acts as the cancel button*
  56.                 return value - Possible value are: -1 = error ; 1 = everything is ok.
  57.  
  58. [*] 
  59. Possible values are 1, 2 and 3 ( counting from right to left ).
  60.  
  61. -----------------------------------------
  62. If you find any bugs or make any changes to this module
  63. please notify me so that everyone can benefit from it.
  64. jakobb@mail.tele.dk
  65.